FEATURE: basic notation standard#2
Conversation
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
ADD: ref anchor Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
READD: fail on warning Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
READD: fail on warning Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
This reverts commit c4118a9.
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
| [[stack.card]] | ||
| suit="heart" | ||
| rank="A" | ||
| [[data.stack.card]] | ||
| suit="heart" | ||
| rank="K" | ||
|
|
||
| [[hands.player_1]] | ||
| [[hands.player_1.card]] | ||
| suit="heart" | ||
| rank="2" |
There was a problem hiding this comment.
this toml is a little bit weird.
a table uses [...] while a table in an array uses [[...]].
There was a problem hiding this comment.
check out this and the following paragraphs about tables and arrays of tables: https://toml.io/en/v1.0.0#array
There was a problem hiding this comment.
I was also thinking, that actually don't need the hands, right?
| class Stack: | ||
| """A list of cards.""" | ||
|
|
||
| def __init__(self, cards: List[Card]): | ||
| """ | ||
| Construct a stack of cards. | ||
|
|
||
| :param cards: A list of cards. | ||
| """ | ||
| self._card_list: List[Card] = cards | ||
|
|
||
| def dumps(self) -> str: | ||
| """Return the stack as TOML string.""" | ||
| card_dump = {'cards': [card.dict() for card in self._card_list]} | ||
| return tomlkit.dumps({'stack': card_dump}) |
There was a problem hiding this comment.
a stack class is not very pythonic, because this could just be a list.
the wrapping is nice for encapsulation though. so its fine i guess.
There was a problem hiding this comment.
but why is the representation {stack={cards=[<card-list>]}} ? why wrap it two times?
it could just be written as an array of cards
There was a problem hiding this comment.
Yeah, I think I had something else in mind originally where I needed an array. I try to change to an array.
Co-authored-by: iTitus <iTitus@users.noreply.github.com>
Co-authored-by: iTitus <iTitus@users.noreply.github.com>
Co-authored-by: iTitus <iTitus@users.noreply.github.com>
No description provided.